import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from '@/views/Index'
import MovieInfo from '@/views/MovieInfo'
import List from '@/views/List'
import Shop from '@/views/Shop'
import Movie from '@/views/Movie'
import Register from '@/views/Register'
import Order from '@/views/Order'
import ReTick from '@/views/ReTick'
import ChangePwd from '@/views/ChangePwd'
import ReFund from '@/views/ReFund'
Vue.use(VueRouter)

  const routes = [
  {
    path: '/',
    name: 'Index',
    component: Index
  },
  {
    path: '/List',
    name: 'List',
    component:List
  },{
    path:'/MovieInfo',
    name:'MovieInfo',
    component:MovieInfo
  },{
    path:'/Movie',
    name:'Movie',
    component:Movie
  },{
    path:'/Shop',
    name:'Shop',
    component:Shop
  },{
    path:'/Register',
    name:'Register',
    component:Register
  },{
    path:'/Order',
    name:'Order',
    component:Order
    },{
    path:'/ReTick',
    name:'ReTick',
    component:ReTick
  },{
    path:'/ChangePwd',
    name:'ChangePwd',
    component:ChangePwd
  },{
    path:'/ReFund',
    name:'ReFund',
    component:ReFund
  }
]

const router = new VueRouter({
  mode: 'hash',
  routes
})
const originalPush = VueRouter.prototype.push
   VueRouter.prototype.push = function push(location) {
   return originalPush.call(this, location).catch(err => err)
}
export default router
